<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns a numerically indexed array containing all defined timezone identifiers</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="datetimezone.listabbreviations.html">DateTimeZone::listAbbreviations</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.dateinterval.html">DateInterval</a></div>
 <div class="up"><a href="class.datetimezone.html">DateTimeZone</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="datetimezone.listidentifiers" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">DateTimeZone::listIdentifiers</h1>
  <h1 class="refname">timezone_identifiers_list</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0)</p><p class="refpurpose"><span class="refname">DateTimeZone::listIdentifiers</span> -- <span class="refname">timezone_identifiers_list</span> &mdash; <span class="dc-title">Returns a numerically indexed array containing all defined timezone identifiers</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-datetimezone.listidentifiers-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">array</span> <span class="methodname"><strong>DateTimeZone::listIdentifiers</strong></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$what</code><span class="initializer"> = DateTimeZone::ALL</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$country</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
  ]] )</div>

  <p class="para rdfs-comment">过程化风格</p>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><a href="function.timezone-identifiers-list.html" class="methodname">timezone_identifiers_list</a></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$what</code><span class="initializer"> = DateTimeZone::ALL</span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$country</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
  ]] )</div>

 </div>


 <div class="refsect1 parameters" id="refsect1-datetimezone.listidentifiers-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">what</code></em></dt>

     <dd>

      <p class="para">
       One of <a href="class.datetimezone.html" class="classname">DateTimeZone</a> class constants.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">country</code></em></dt>

     <dd>

      <p class="para">
       A two-letter ISO 3166-1 compatible country code.
      </p>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <span class="simpara">
        This option is only used when <em><code class="parameter">what</code></em> is set to
        <strong><code>DateTimeZone::PER_COUNTRY</code></strong>.
       </span>
      </p></blockquote>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-datetimezone.listidentifiers-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns array on success 或者在失败时返回 <strong><code>FALSE</code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-datetimezone.listidentifiers-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.3.0</td>
       <td>
        Added the optional <em><code class="parameter">what</code></em> and
        <em><code class="parameter">country</code></em> parameters.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-datetimezone.listidentifiers-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2218">
    <p><strong>Example #1 A <span class="function"><a href="function.timezone-identifiers-list.html" class="function">timezone_identifiers_list()</a></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$timezone_identifiers&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">DateTimeZone</span><span style="color: #007700">::</span><span style="color: #0000BB">listIdentifiers</span><span style="color: #007700">();<br />for&nbsp;(</span><span style="color: #0000BB">$i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">$i</span><span style="color: #007700">++)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">$timezone_identifiers</span><span style="color: #007700">[</span><span style="color: #0000BB">$i</span><span style="color: #007700">]</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程的输出类似于：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
</pre></div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-datetimezone.listidentifiers-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.timezone-abbreviations-list.html" class="function" rel="rdfs-seeAlso">timezone_abbreviations_list()</a> - 别名 DateTimeZone::listAbbreviations</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="datetimezone.listabbreviations.html">DateTimeZone::listAbbreviations</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="class.dateinterval.html">DateInterval</a></div>
 <div class="up"><a href="class.datetimezone.html">DateTimeZone</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
